<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>书公司管理 </title>
<@fm.header />
<script type="text/javascript" src="/resources/js/common.js"></script>
<script type="text/javascript" src="/resources/js/book/bookCompany.js"></script>
</head>
<body class="cmp-list-body">

<div id="tb" style="padding:3px">
	<span>书籍公司</span>
	<input id="sname" class="easyui-textbox" style="width: 155px;"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="doAdd();">新增</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="doEdit();">修改</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="doDel();">删除</a>
</div>
<table id="tt" title="书籍公司管理 " toolbar="#tb" rownumbers="true" 
	singleSelect="false" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]">  
    <thead>
        <tr>
            <th align="center" width="10%" field="id" checkBox="true"></th>
            <th align="center" width="1%" field="bookGroupId" hidden="true" ></th>
		    <th align="center" width="20%" field="name">书籍公司</th>
		    <th align="center" width="20%" field="bookGroupName">书单名</th>
		    <th align="center" width="10%" field="status" formatter="formatStatus">状态</th>
		    <th align="center" width="10%" field="createDate">创建时间</th>
		    <th align="center" width="10%" field="modifyDate">修改时间</th>
        </tr>
    </thead>   
</table>

<div id="addWin" class="easyui-window" title="书籍公司管理|新增修改" closed="true" collapsible="false" minimizable="false"  maximizable="false" style="width:500px;height:450px"   
        data-options="iconCls:'icon-save',modal:true">
     <div fit="true">
        <form id="addForm"  method="post" >
            <input id="idId"  name="id" type="hidden"/>   
            <table>
		        <tr>
		             <td align="left">书籍公司</td>
		             <td><input id="name" class="easyui-validatebox" data-options="required:true"  name="name" style="width:300px"></input></td>
		        </tr>	
		        <tr>
		             <td align="left">选择书单</td>
		             <td><span id="bookGroupName"></span>
		              <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="selectGroup();">选择</a>
		             <input id="bookGroupId" name="bookGroupId" type="hidden"></input></td>
		        </tr>
		        <tr>
		             <td align="left">状态</td>
		             <td>
		             <select class="easyui-combobox" id="status" name="status" panelHeight="auto" style="width:155px" data-options="required:true">
	                	<option value="1" selected>启用</option>
	                	<option value="0" >关闭</option>
		             </select>
		             </td>
		        </tr>	
           </table>
        </form>
        <div style="padding: 25px; text-align: center;">
            <a href="#" class="easyui-linkbutton" onclick="cancel();">取消</a>
            <a href="#" class="easyui-linkbutton"  onclick="save();">保存</a> 
        </div>
    </div>
</div>

<div id="selectWin" title="选择书单" class="easyui-window" closed="true" collapsible="false" minimizable="false"  maximizable="false"  style="width:500px;height:500px">
    <div fit="true" class="easyui-layout" style="overflow:scroll">
		<table id="tbGroup"  class="easyui-datagrid" fitColumns="true"
					rownumbers="true" singleSelect="true"  
					pagination="true" fitColumns="true" pageSize="50" pageList="[50,100,200,400]"
					selectOnCheck="true" idField="id" toolbar="#searchCompany" 
					 data-options="onDblClickRow:onDblClickRow" >    
					<thead>
						<tr>
							<th align="left" width="40%" field="name">书单名称</th>
							<th align="left" width="10%" field="status">状态</th>
						</tr>
					 </thead>   
		</table>  
	</div>
</div>

<div id="searchCompany" style="padding:3px">
	<span>书单名称</span>
	<input id="groupName" class="easyui-textbox" style="width: 155px;"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearchGroup();">查询</a>
</div>

</body>
</html>